<?php

use Illuminate\Support\Facades\Schema;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Database\Migrations\Migration;

class CreateSubjectTable extends Migration
{
    /**
     * Run the migrations.
     *
     * @return void
     */
    public function up()
    {
        //
        Schema::create('subject',function(Blueprint $table){
            $table->engine = 'MyISAM';
            $table->smallIncrements('id')->comment('主键');
            $table->string('subject_name',50)->unique()->comment('学科名称');
            $table->string('logo',255)->default('')->comment('图标');
            $table->softDeletes()->comment('软删除');
            $table->timestamps();
        });
    }

    /**
     * Reverse the migrations.
     *
     * @return void
     */
    public function down()
    {
        //

        Schema::dropIfExists('subject');
    }
}
